package com.hisense.hiioc.hismartplate.robot.message;


import com.hisense.hiioc.hismartplate.constants.DirectiveType;
import com.hisense.hiioc.hismartplate.utils.UUIDGenerator;

/**
 * @Auther:biexiande@hisense.com
 * @date:2018/1/24 10:23
 * @des
 */
public class Header {
    private String namespace;
    private String name ;
    private String messageId;

    public String getNamespace() {
        return namespace;
    }

    public void setNamespace(String namespace) {
        this.namespace = namespace;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMessageId() {
        return messageId;
    }

    public void setMessageId(String messageId) {
        this.messageId = messageId;
    }

    public Header(String namespace, String name, String messageId) {
        this.namespace = namespace;
        this.name = name;
        this.messageId = messageId;
    }

    public Header(String namespace, String name) {
        this(namespace,name, UUIDGenerator.create32Key());
    }

    public Header (DirectiveType directiveType, String messageId){
        this(directiveType.getNameSpace(),directiveType.getName(),messageId);
    }
}